home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / DClap / DTask.h < prev    next >
Encoding:
Text File  |  1996-07-05  |  844 b   |  43 lines  |  [TEXT/R*ch]

  1. // DTask.h
  2. // d.g.gilbert
  3.  
  4. #ifndef _DTASK_
  5. #define _DTASK_
  6.  
  7. #include "Dvibrant.h"
  8. #include "DObject.h"
  9.  
  10. class DTaskMaster;
  11.  
  12. class DTask : public DObject
  13. {    
  14. public:
  15.     enum tasktypes { kNoTask=0, kMenu, kMouseDown, kMouseUp, kKeyDown, kKeyUp, 
  16.             kUpdate, kActivate, kSuspend, kResume, kIdle, kDisk, kTracker, kCommander,
  17.             kOtherTask};    // not sure of the use of this enum
  18.     
  19.     long        fNumber;
  20.     short        fKind;
  21.     long        fExtra;
  22.     DTaskMaster*    fSource;
  23.     Boolean    fRepeat;
  24.     
  25.     DTask(long num, short itsKind, DTaskMaster* itsSource, long extra = 0) :
  26.         fNumber(num),
  27.         fKind(itsKind),
  28.         fSource(itsSource),
  29.         fExtra(extra),
  30.         fRepeat(false)
  31.             {}
  32.         
  33.     virtual void DoIt() {}
  34.     virtual void Undo() {}
  35.     virtual void Redo() { this->DoIt(); }
  36.     virtual void Process();
  37.     virtual void Commit() {}
  38.     void SetRepeat(Boolean turnon= true) { fRepeat= turnon; }
  39. };
  40.  
  41.  
  42. #endif
  43.